package com.jason.library.delegate.property

import kotlin.properties.ReadWriteProperty
import kotlin.reflect.KProperty

class Delegate2 : ReadWriteProperty<Any, Int> {

    override fun getValue(thisRef: Any, property: KProperty<*>): Int {
        return 20
    }

    override fun setValue(thisRef: Any, property: KProperty<*>, value: Int) {
        println("${value+20}")
        println("委托属性为：${property.name} 委托值为：$value")
    }
}